<f:layout name="Login" />

<f:section name="ResetPassword">
    <div class="typo3-login-form t3js-login-formfields">
        <h2><f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_reset_password.xlf:headline" /></h2>
        <f:if condition="{invalidToken}">
            <f:then>
                <f:be.infobox message="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_reset_password.xlf:error.token_expired')}" title="" state="1" />
                <p>
                    <f:be.link class="btn btn-block btn-login" route="password_forget" parameters="{loginProvider: loginProviderIdentifier}"><f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_reset_password.xlf:button.restart" /></f:be.link>
                </p>
            </f:then>
            <f:else if="{resetExecuted}">
                <div class="callout callout-success">
                    <div class="media">
                        <div class="media-body">
                            <h4 class="callout-title"><f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_reset_password.xlf:reset_success.headline" /></h4>
                            <div class="callout-body"><f:format.raw><f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_reset_password.xlf:reset_success.message" arguments="{0: '{f:be.uri(route: \'login\')}'}"/></f:format.raw></div>
                        </div>
                    </div>
                </div>
            </f:else>
            <f:else>
                <f:if condition="{error}">
                    <f:be.infobox message="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_reset_password.xlf:error.password')}" state="1" />
                </f:if>
                <p><f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_reset_password.xlf:instructions.password" /></p>
                <form action="{f:be.uri(route: 'password_reset_finish', parameters: '{i: identity, t: token, e: expirationDate}')}" method="post" name="forget-password-form" id="typo3-forget-password-form">
                    <f:form.hidden name="loginProvider" value="{loginProviderIdentifier}" />
                    <div class="form-group">
                        <div class="form-control-wrap">
                            <div class="form-control-holder">
                                <input type="password" name="password" placeholder="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_reset_password.xlf:input.password')}" value="" class="form-control input-login t3js-clearable" autocomplete="off" autofocus="autofocus" required="required" />
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="form-control-wrap">
                            <div class="form-control-holder">
                                <input type="password" name="passwordrepeat" placeholder="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_reset_password.xlf:input.passwordrepeat')}" value="" autocomplete="off" class="form-control input-login t3js-clearable" required="required" />
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <button class="btn btn-block btn-login" type="submit" name="forgotPasswordSubmit">
                            <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_reset_password.xlf:button.reset" />
                        </button>
                    </div>
                </form>
            </f:else>
        </f:if>
    </div>
</f:section>
